﻿using System.Web;

namespace EnetaMvc.Web.Extensions
{
    public static class SessionExtensions
    {
        public static long GetUserId(this HttpSessionStateBase session)
        {
            if (session == null)
                return 0;

            if (session["UserId"] == null)
                return 0;

            return (long)session["UserId"];
        }
    }
}